package com.skd.ssm.web.controls;

import javax.annotation.Resource;


import com.skd.ssm.domain.User;
import com.skd.ssm.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;



@Controller
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("/showUser")
    public String toIndex(Model model){
        User user = this.userService.selectByPrimaryKey(1);
        model.addAttribute("user", user);
        return "showUser";
    }
}
